import request from '@/utils/request'

export function fetchGiftList(query) {
  return request({
    url: '/XinMiao_MS/gift/list',
    method: 'get',
    params: query
  })
}

export function fetchGift(id) {
  return request({
    url: '/XinMiao_MS/gift/detail',
    method: 'get',
    params: { id }
  })
}

export function createGift(data) {
  return request({
    url: '/XinMiao_MS/gift/create',
    method: 'post',
    data
  })
}

export function updateGift(data) {
  return request({
    url: '/XinMiao_MS/gift/update',
    method: 'post',
    data
  })
}
